typedef enum LogLevel
{
    LOG_LEVEL_TRACE = 1,
    LOG_LEVEL_DEBUG,
    LOG_LEVEL_INFO,
    LOG_LEVEL_WARNING,
    LOG_LEVEL_ERROR,
    LOG_LEVEL_FATAL
} LogLevel;

/*
  Usage:

  ----
  #define DEBUG
  #include "log.h"
  ----

  This allows you to easily toggle debugging for a file.
*/
  
#ifdef DEBUG
void ex_log(LogLevel level, const char *format, ...);
#define xprintf ex_log
#else
#define xprintf(...)
#endif

/* die (fatal) is always available */
EX_NORETURN void die(const char *format, ...);
